package com.ddpt.platform.common.constant;

import cn.hutool.core.collection.CollectionUtil;

import java.util.Set;

/**
 * 全局常量
 */
public class GlobalConstant {

    /**
     * header 头中存放的是否需要加解密的key
     */
    public static final String header_enable_secret = "enableSecret";

    /**
     * header 头中存放的加解密使用的密钥
     */
    public static final String header_secret_key = "secretKey";

    /**
     * header 头中存放的链路id
     */
    public static final String header_log_trance_id = "tranceId";

    /**
     * 超管类型
     */
    public static final Integer SUPER_ADMIN = 0;

    /**
     * 一般表示积极状态(启用、已删除)
     */
    public static final Integer ONE = 1;

    /**
     * 一般表示消极状态(停用、未删除)
     */
    public static final Integer ZERO = 0;

    /**
     * 一般表示消极状态(停用、未删除)
     */
    public static final String ZERO_STRING = "0";

    /**
     * 一般表示积极状态(启用、已删除)
     */
    public static final String ONE_STRING = "1";

    public static final String SEPARATOR_REGEX = "\\$\\$";

    //是否检查请求头的sign
    public static final String IS_CHECK_HEADER_SIGN = "IS_CHECK_HEADER_SIGN";

    /**
     * 答题时间缓存
     */
    public static final String ANSWER_KEY = "ANSWER_KEY#%s#%s";

    /**
     * 答题题目缓存
     */
    public static final String ANSWER_QUESTION_KEY = "ANSWER_QUESTION_KEY#%s#%s";

    public static final Set<String> EXCEL_SUFFIX = CollectionUtil.newHashSet("xls","xlsx","XLS","XLSX");
}
